READ NLY (file ;*)
                                                                                    Pg 30-10
              
file         File      File for which to set read-only state
*                       Set Read only state for all database files  [4D 3.1.1.]

READ ONLY changes the state of file to read-only for the process in which it is called. All subsequent records that are loaded are locked, and you cannot make any changes made to them.

Use READ ONLY when you do not need to modify the record or records.

The optional parameter (*) allows you to switch the access mode to read only for all the files of the database.

Reminder: Changing the access mode to a file, does NOT change the status of the current record, if any. After a call to READ ONLY, if the current record was loaded in read write, the current record is still loaded in read write. To try to get the record locked, you  must loop on LOAD ECORD until the Locked function returns True.

For more information, refer to the example in "Loops o oad nlocked ecords"

See also:   ocked, READ RITE